package com.xmj.ms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xmj.ms.mapper.BarberShopGoodsMapper;
import com.xmj.ms.domain.BarberShopGoods;
import com.xmj.ms.service.IBarberShopGoodsService;

/**
 * 库存管理Service业务层处理
 *
 * @author ohh
 * @date 2024-04-17
 */
@Service
public class BarberShopGoodsServiceImpl implements IBarberShopGoodsService
{
    @Autowired
    private BarberShopGoodsMapper barberShopGoodsMapper;

    /**
     * 查询库存管理
     *
     * @param goodsId 库存管理主键
     * @return 库存管理
     */
    @Override
    public BarberShopGoods selectBarberShopGoodsByGoodsId(Long goodsId)
    {
        return barberShopGoodsMapper.selectBarberShopGoodsByGoodsId(goodsId);
    }

    /**
     * 查询库存管理列表
     *
     * @param barberShopGoods 库存管理
     * @return 库存管理
     */
    @Override
    public List<BarberShopGoods> selectBarberShopGoodsList(BarberShopGoods barberShopGoods)
    {
        return barberShopGoodsMapper.selectBarberShopGoodsList(barberShopGoods);
    }

    /**
     * 新增库存管理
     *
     * @param barberShopGoods 库存管理
     * @return 结果
     */
    @Override
    public int insertBarberShopGoods(BarberShopGoods barberShopGoods)
    {
        return barberShopGoodsMapper.insertBarberShopGoods(barberShopGoods);
    }

    /**
     * 修改库存管理
     *
     * @param barberShopGoods 库存管理
     * @return 结果
     */
    @Override
    public int updateBarberShopGoods(BarberShopGoods barberShopGoods)
    {
        return barberShopGoodsMapper.updateBarberShopGoods(barberShopGoods);
    }

    /**
     * 批量删除库存管理
     *
     * @param goodsIds 需要删除的库存管理主键
     * @return 结果
     */
    @Override
    public int deleteBarberShopGoodsByGoodsIds(Long[] goodsIds)
    {
        return barberShopGoodsMapper.deleteBarberShopGoodsByGoodsIds(goodsIds);
    }

    /**
     * 删除库存管理信息
     *
     * @param goodsId 库存管理主键
     * @return 结果
     */
    @Override
    public int deleteBarberShopGoodsByGoodsId(Long goodsId)
    {
        return barberShopGoodsMapper.deleteBarberShopGoodsByGoodsId(goodsId);
    }
}
